/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package xmarti.vacaxm.beans.sequence;

import java.util.Date;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;



/**
 *
 * @author xmarti
 */
public class StateSequence implements java.io.Serializable {
    private int id;
    private Sequence sequence; 
    private State state;
    private Date highDate;
    private Date endDate;
    private int order;
    private Set<NoticeState> notices= new HashSet<NoticeState>();
    private int active;

    public StateSequence() {
    }
    
    public StateSequence(Sequence sequence, State state, Date highDate) {
        this.sequence = sequence;
        this.state = state;
        this.highDate = highDate;
    }
    
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Sequence getSequence() {
        return sequence;
    }

    public void setSequence(Sequence sequence) {
        this.sequence = sequence;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public Date getHighDate() {
        return highDate;
    }

    public void setHighDate(Date hightDate) {
        this.highDate = hightDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Set<NoticeState> getNotices() {
        return notices;
    }

    public void setNotices(Set<NoticeState> notices) {
        this.notices = notices;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    

    public int isActive() {
        return active;
    }
    public void setActive(int active) {
        this.active = active;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 97 * hash + Objects.hashCode(this.sequence);
        hash = 97 * hash + Objects.hashCode(this.state);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final StateSequence other = (StateSequence) obj;
        if (!Objects.equals(this.sequence, other.sequence)) {
            return false;
        }
        if (!Objects.equals(this.state, other.state)) {
            return false;
        }
        return true;
    }
    @Override
    public String toString(){
        return this.state.toString();
        
    }
            
    
            
}
